package week02.fruit;

/**
 * Created by zhangxiaokun on 2018/1/31.
 */
public class TestFruit {
    public static void main(String[] args) {
        //苹果
        Fruit fruit = FruitGardener.factory(Apple.class);
        fruit.plant();
        fruit.grow();
        fruit.harvest();

        //葡萄
        fruit = FruitGardener.factory(Grape.class);
        fruit.plant();
        fruit.grow();
        fruit.harvest();
    }
}
